package com.cc.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

@Configuration // 声明当前类为配置类
@Import({MyBatisConfig.class, JdbcConfig.class}) // 引入MyBatis配置类,
@PropertySource("classpath:database.properties") // 引入数据库配置文件
@ComponentScan(
        // 指定要扫描的包
        basePackages = "com.cc",
        // 扫描除了Controller的类
        excludeFilters = {
                @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = Controller.class),
                @ComponentScan.Filter(type = FilterType.ANNOTATION,classes = RestController.class)
        }
)
public class SpringConfig {
}
